package com.sunday.common.core.enums;

import com.sunday.common.core.gson.GsonUtils;
import lombok.AllArgsConstructor;

import java.util.Map;

/**
 * Http请求自定义错误码
 *
 * @author zsy
 * @since 2024/1/16
 */
@AllArgsConstructor
public enum HttpExpandStatusEnum {

    /**
     * Sentinel限制
     */
    CIRCUIT_BREAK(530, "Sentinel限制");

    public int code;

    public String message;

    public String toJson() {
        return GsonUtils.DEFAULT.toJson(Map.of(this.code, this.message));
    }

}
